/**
 * karin 2017.03.28
 */
import apiHelper from './apiHelper'
//import Violation from '../utils/violation' // 这个是跳转违章网址，判断环境的JS

class taxCheckInfoService {
    //请求 ：通过订单号，得到车辆相关数据
    getInfo(data) {
        let requestParam = {
            url: `${apiHelper.baseApiUrl}cars/findByOrderId`, // test 测试:实际是 url: urls
            data: {
                method: 'get',
                body: data
            }
        };
        return apiHelper.fetch(requestParam);
    }
    //请求 ：通过carID，得到车辆违章数据
    getViolaNum(data) {
        let requestParam = {
            url: `${apiHelper.baseApiUrl}violation/view`, // test 测试:'http://192.168.2.171:804/test.json',实际是 url: urls
            data: {
                method: 'get',
                body: data
            }
        };
        return apiHelper.fetch(requestParam);
    }
    // 请求：寄送资料，提交不返回
    // 免检
    sendDataFree(data) {
        let requestParam = {
            url: `${apiHelper.baseApiUrl}flow/confirmProject`, 
            data: {
                method: 'post',
                body: data
            }
        };
        return apiHelper.fetch(requestParam);
    }
    // 请求：寄送资料，提交不返回
    //上线检
    sendData(data) {
        let requestParam = {
            url: `${apiHelper.baseApiUrl}flow/doConfirm`, 
            data: {
                method: 'post',
                body: data
            }
        };
        return apiHelper.fetch(requestParam);
    }
    // 请求：寄送资料条件
    getvaillData(data) {
        let requestParam = {
            url: `${apiHelper.baseApiUrl}inspection/requirements`, 
            data: {
                method: 'post',
                body: data
            }
        };
        return apiHelper.fetch(requestParam);
    }

    setRequirementStatus(data){
        let requestParam = {
            url: `${apiHelper.baseApiUrl}inspection/putRequirements`,
            data: {
                method: 'post',
                body: data
            }
        };
        return apiHelper.fetch(requestParam);
    }

    getInsuranceDate(data){
        let requestParam = {
            url: `${apiHelper.baseApiUrl}inspection/getInsuranceDate`,
            data: {
                method: 'get',
                body: data
            }
        };
        return apiHelper.fetch(requestParam);
    }

}

export default new taxCheckInfoService();